<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
<div style="width: 200px;height: 200px">
<a @click="bdd" v-show="index!=0">左</a>
<img :src="imgarr[index]" alt="">
<a @click="add" v-show="index<imgarr.length-1">右</a>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
var app=new Vue({
    el:"#app",
    data:{
       imgarr:["house1.jpg",
           "house2.jpg",
           "house3.jpg",
           "house4.jpg",
           "house5.jpg"] ,
        index:0
    },
    methods:{
        add:function () {
            this.index++
        },
        bdd:function () {
            this.index--
        }

    }



})

</script>
</body>
</html>